#include<stdio.h>
#include <stdlib.h>
#include"../include/event.h"
#include<time.h>
void timeout_cb(int fd, short event,void* argc)
{
	printf("like\n");
}

int main(int argn, char **argv)
{
	struct event_base* base=event_init();
	struct event* timeout_event;
	timeout_event=(struct event*)malloc(sizeof(struct event));
	evtimer_set(timeout_event,timeout_cb,NULL);
	timeout_event->ev_events=(timeout_event->ev_events)|EV_PERSIST;
	struct timeval tv={1,0};
	evtimer_add(timeout_event, &tv);
	event_base_dispatch(base);
	//event_free(timeout_event);
	event_base_free(base);
	return 0;
}
